package blocstac.editimage
{
public class EditState
{
	private var _state:uint
	
	function EditState(state:uint)
	{
		_state = state
	}
	
	private static var _zoomable:EditState = new EditState(1)
	public static function get zoomable():EditState {
		return _zoomable
	}

	private static var _readable:EditState = new EditState(2)
	public static function get readable():EditState {
		return _readable
	}
	
	private static var _editable:EditState = new EditState(3)
	public static function get editable():EditState {
		return _editable
	}
	
	//----------------------------------
	//  request state
	//----------------------------------
	/**
	 * 
	 */
	public function get isZoomable():Boolean {
		return _state == 1
	}
	
	/**
	 * 
	 */
	public function get isReadable():Boolean {
		return _state == 2
	}
	
	/**
	 * 
	 */
	public function get isEditable():Boolean {
		return _state == 3
	}
	
	//----------------------------------
	//  toString()
	//----------------------------------
	public function toString():String {
		switch (_state) {
			case 1: return "zoomable"
			case 2: return "readable"
			case 3: return "editable"
			default: return "unkown"
		}
	}	
}
}